/*
 * @Author: cgl
 * @Date: 2023-04-20 09:49:21
 * @LastEditors: cgl
 * @LastEditTime: 2023-08-15 20:45:57
 * @FilePath: \public-health-emergencies-fed:\radiation-hygiene-fe\src\api\basicData\seal.js
 * @Description:
 *
 * Copyright (c) 2023 by cgl/微盛信息产业有限公司, All Rights Reserved.
 */
import request from '@/utils/request'

// 查询印章列表
export function sealList(data) {
  return request({
    url: '/basic/seal/list',
    method: 'post',
    data,
  })
}
// 查询单个印章信息
export function getInfoSeal(sealId) {
  return request({
    url: `/basic/seal/getInfo/${sealId}`,
    method: "get",
  });
}
// 添加印章
export function sealAdd(data) {
  return request({
    url: '/basic/seal/add',
    method: 'post',
    data,
  })
}
// 修改印章
export function sealUpdate(data) {
  return request({
    url: '/basic/seal/update',
    method: 'post',
    data,
  })
}
// 删除印章
export function sealRemove(sealId) {
  return request({
    url: `/basic/seal/remove/${sealId}`,
    method: 'get'
  })
}
// 构建印章
export function generator(data) {
  return request({
    url: '/basic/seal/generator',
    method: 'post',
		data,
		headers: {
			repeatSubmit: false,
		}
  })
}
// 上传图片
export function upload(data) {
	return request({
		url: '/system/oss/upload',
		method: 'post',
    headers: {
      'Content-Disposition': 'inline',
      // 'Content-Type': 'multipart/form-data;'
    },
		data
	})
}
// 上传图片(新)
export function upload2(data) {
	return request({
		url: '/system/oss/uploadSign',
		method: 'post',
    headers: {
      'Content-Disposition': 'inline',
      // 'Content-Type': 'multipart/form-data;'
    },
		data
	})
}
// 上传手写签名（移动端）
export function handwritingByUserId(data) {
	return request({
		url: '/basic/seal/handwritingByUserId',
		method: 'post',
		data
	})
}
// 确认手写签名
export function confirmSealByUserId(userId, ossId) {
	return request({
		url: `/basic/seal/confirmSealByUserId/${userId}/${ossId}`,
		method: 'get',
	})
}
